﻿@{
    ViewData["Title"] = "PostItemView";
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>layui在线调试</title>
    <link href="~/layui/css/layui.css" rel="stylesheet" />
</head>
<body>
    <form class="layui-form" action="/Vehicle/CreateVehicle" lay-filter="example">
        <div class="layui-form-item">
            <div style="float:left">
                <label class="layui-form-label">厂牌型号：</label>
                <div class="layui-input-block">
                    <input type="text" name="Vmodel" id="Vmodel" lay-verify="required" autocomplete="off" placeholder="厂牌型号" class="layui-input">
                </div>
            </div>
             <div style="float:left">
                <label class="layui-form-label">车牌号：</label>
                <div class="layui-input-block">
                    <input type="text" name="Vmark" id="Vmark" lay-verify="required" autocomplete="off" placeholder="车牌号" class="layui-input">
                </div>
            </div>
         </div>
        <div class="layui-form-item">
             <div style="float:left">
                <label class="layui-form-label">司机姓名：</label>
                <div class="layui-input-block">
                    <input type="text" name="Ownername" id="Ownername" lay-verify="required" autocomplete="off" placeholder="司机姓名" class="layui-input">
                </div>
            </div>
             <div style="float:left">
                <label class="layui-form-label">所属公司：</label>
                <div class="layui-input-block">
                    <input type="text" name="Fieldname" id="Fieldname" lay-verify="required" autocomplete="off" placeholder="所属公司" class="layui-input">
                </div>
            </div>
         </div>
        <div class="layui-form-item">
              <div style="float:left">
                <label class="layui-form-label">车长：</label>
                <div class="layui-input-block">
                    <input type="text" name="Vlong" id="Vlong" lay-verify="required" autocomplete="off" placeholder="车长" class="layui-input">
                </div>
            </div>
             <div style="float:left">
                <label class="layui-form-label">车宽：</label>
                <div class="layui-input-block">
                    <input type="text" name="Vwide" id="Vwide" lay-verify="required" autocomplete="off" placeholder="车宽" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div style="float:left">
                <label class="layui-form-label">车高：</label>
                <div class="layui-input-block">
                    <input type="text" name="Vhigh" id="Vhigh" lay-verify="required" autocomplete="off" placeholder="车高" class="layui-input">
                </div>
            </div>
             <div style="float:left">
                <label class="layui-form-label">车辆颜色：</label>
                <div class="layui-input-block">
                    <input type="text" name="Vcolor" id="Vcolor" lay-verify="required" autocomplete="off" placeholder="车辆颜色" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-inline">
            <div class="layui-inline">
                <label class="layui-form-label">购置日期</label>
                <div class="layui-input-inline">
                    <input type="date" name="Vpurchase" id="Vpurchase" lay-verify="SigningDate" autocomplete="off" class="layui-input" placeholder="年/月/日">
                </div>
            </div>
             <div style="float:left">
                <label class="layui-form-label">运营证号：</label>
                <div class="layui-input-block">
                    <input type="text" name="Voperation" id="Voperation" lay-verify="contractTitle" autocomplete="off" placeholder="运营证号" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div style="float:left">
                <label class="layui-form-label">保险到期时间</label>
                <div class="layui-input-inline">
                    <input type="date" name="Vexpire" id="Vexpire" lay-verify="SigningDate" autocomplete="off" class="layui-input" placeholder="年/月/日">
                </div>
            </div>
             <div class="layui-inline">
                <label class="layui-form-label">年检到期时间</label>
                <div class="layui-input-inline">
                    <input type="date" name="Vannual" id="Vannual" lay-verify="SigningDate" autocomplete="off" class="layui-input" placeholder="年/月/日">
                </div>
            </div>
        </div>
          <div class="layui-form-item">
            <div style="float:left">
                <label class="layui-form-label">保养公里设置时间</label>
                <div class="layui-input-inline">
                    <input type="date" name="Vmaintain" id="Vmaintain" lay-verify="SigningDate" autocomplete="off" class="layui-input" placeholder="年/月/日">
                </div>
            </div>
        </div>
     
        
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
                <a class="layui-btn layui-btn-primary" onclick="location.href='/Vehicle/Index'">返回</a>
            </div>
        </div>
    </form>
    <script src="~/libs/jquery/jquery.js"></script>
    <script src="~/layui/layui.js" charset="utf-8"></script>

    <script>
        layui.use(['form', 'layedit', 'laydate','upload'], function(){
          var form = layui.form
          ,layer = layui.layer
          ,layedit = layui.layedit
          ,laydate = layui.laydate
          ,upload = layui.upload
          ,element = layui.element;

          //日期
          laydate.render({
            elem: '#SigningDate'
          });
          form.render();
          //监听提交
          form.on('submit(demo1)', function(data){
          });
          //指定允许上传的文件类型
          upload.render({
            elem: '#test3'
            ,url: '/CarryContract/FileUpload' //此处配置你自己的上传接口即可
            ,accept: 'file' //普通文件
            ,done: function(res){
              layer.msg('上传成功');
              console.log(res);
            }
          });
        });
    </script>
</body>
</html>
